home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-021.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  37.4 KB  |  1,036 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Wed, 18 Mar 92       Volume 1 : Issue 21
  2.  
  3. Today's Topics:
  4.  
  5.     GameMaster - Mailing List/summary of suggestions and bugs
  6.     How to tell if you've got a DialogPeek or a WindowPtr?
  7.     How do you find something in memory fast?
  8.     Using Fonts in Application
  9.     A question on clipping
  10.     Q: where to find 680x0 instruction timings?
  11.     Prograph experiences?
  12.     TeachText doesn't reply to 'odoc' events.  Why?
  13.     (Q): How do I execute UpdateEvents?
  14.     Dialog Boxes & float variables in THINK C
  15.  
  16.  
  17. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  18.  
  19. These digests are available (by using FTP, account anonymous, your email
  20. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  21. edu (try skinner.cs.uoregon.edu if that doesn't work).  This is also the home
  22. of the comp.sys.mac.programmer Frequently Asked Questions list.
  23.  
  24. These digests are also available via email.  Just send a note saying that you
  25. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  26. automatically receive each new digest as it is created.
  27.  
  28. The articles in these digests are taken directly from comp.sys.mac.programmer.
  29. They are not edited; all articles included in this digest are in their original
  30. posted form.  The only articles that are -not- included in these digests are
  31. those which didn't receive any replies (except those that give information
  32. rather than ask a question).  All replies to each article are concatenated
  33. onto the original article in the order in which they were received.  Article
  34. threads are not added to the digests until the last article added to the
  35. thread is at least one month old (this is to ensure that the thread is dead
  36. before adding it to the digests).
  37.  
  38. Send administrative mail to mkelly@cs.uoregon.edu.
  39.  
  40. -------------------------------------------------------
  41.  
  42. From: gurhs@uniwa.uwa.oz.au (Rhys Hollow)
  43. Subject: GameMaster - Mailing List/summary of suggestions and bugs
  44. Organization: University of Western Australia
  45. Date: Sun, 16 Feb 1992 04:24:24 GMT
  46.  
  47.  
  48.   Well,
  49.  
  50.    a while ago I posted a request for ideas/suggestions and programmers
  51. for GameMaster and its rulebooks.  I got a lot of replies, and a lot of
  52. useful suggestions, and I thought I would summarize them here in the
  53. hope to get some more :)
  54.  
  55.    First I would like to announce that due to the kind efforts of a
  56. Steve, GameMaster now has a mailing list.  The mailing list will start
  57. off as a developer list for helping people write their own rulebooks,
  58. but might eventually turn into a 'I want to play this game' list.  If
  59. you are at all interested in GameMaster, join the list.  You can always
  60. unsubscribe later.
  61.   To subscribe to the list, mail me (Rhys) at gurhs@uniwa.uwa.oz.au.
  62.  
  63.   Now first of all I will list the games people suggested be written as
  64. rulebooks.  Take a look at the list, and if it gives you any more ideas,
  65. or you think you would play one of them if it was written, let me know.
  66. We still need programmers.  Come on guys (and gals)! I wrote a rulebook over the
  67. weekend.  It took me two days, and most of that was drawing the
  68. graphics! 
  69.  
  70.   Suggested rulebooks.
  71.   --------------------
  72.  
  73.   light cycles
  74.   2 player shoot-em-up with obstacles
  75.   nethack style co-operative game
  76.   Spectre/Battlezone
  77.   a Mazewar like game 
  78.   Checkers
  79.   Chinese Checkers
  80.   Go
  81.   Risk
  82.   Poker
  83.   Tennis
  84.   Mastermind
  85.   Crib  (or was that cribbage?)
  86.   Hangman
  87.   Scrabble
  88.   Stratego
  89.  
  90.   bear in mind that GameMaster only handles 2 or less players (not
  91. counting computer players).  This list is only a suggestion list.  If
  92. you have any better ideas, let me know!
  93.  
  94.   Here is a list of the complaints/suggestions people gave me about
  95. GameMaster and its rulebooks.
  96.  
  97.   Complaints/Suggestions
  98.   ----------------------
  99.  
  100.   Need Help command for each rulebook
  101.       This is a good suggestion, and easy to implement.  GM 2 will have
  102.       it.
  103.      
  104.   Need colour, resizable windows.
  105.       GM 2 has colour now, am still working on resizable windows.
  106.  
  107.   Downloading too much of a security risk
  108.       I had a big discussion with the person who said this (hi Stephen :)
  109.       We eventually agreed to disagree.
  110.  
  111.   A finger-like function, to see if a person is running GM
  112.       I'm working on a program (well actually I'm delegating :) that
  113.       allows you to telnet to it and say 'Im available for this game'
  114.       May be a while yet though.
  115.  
  116.   need more rulebooks that utilise the element of secrecy between the
  117.     two machines.
  118.         Agreed.  but what ones?  and why won't anyone write them?
  119.  
  120.   Chess -  doesn't handle stalemate
  121.            forces you to move the piece once you pick it up
  122.            doesn't change the board orientation depending on what side
  123.               you are playing
  124.            no visual indication of check or mate.
  125.  
  126.         An upgrade to the chess rulebook is coming.  Just as soon as I
  127.         get some mac time.
  128.  
  129.   Needs multiple players.
  130.       Tell me about it.
  131.  
  132.   Can't find anyone to play with.
  133.       Working on it.  Join the mailing list, it might help.
  134.  
  135.   Don't have Pascal, want the C interfaces (Dave!  where are you?  :)
  136.       three of four people mailed me asking for C interfaces.  Sorry
  137.       guys!  I'm working on it.  any day now!
  138.  
  139.   Derfball -  what is it?  
  140.      a source of confusion to many people, that's what it is.  I think I
  141.      will release a 'one player' version.  When I get the time of course.
  142.  
  143.   
  144.   Well that's about all really.  I have one third party rulebook in the
  145. pipeline (Mancala), I wrote a rulebook over the weekend (Isolation), I'm
  146. working on a generic card player,  I'm trying to get resizable windows
  147. into gamemaster, while putting in Help commands and preferences and
  148. computer players.  I need some HELP!  I need to be able to get on with
  149. GM 2 while other people start writing rulebooks.  
  150.   GM 2 will handle colour and possibly resizable rulebooks, but the
  151. GM/Rulebook interface will not change!  All rulebooks written for GM 1
  152. will work perfectly with GM 2.  To take advantage of colour, only slight
  153. alterations to existing rulebooks is needed.  And that's only if you
  154. want them to come out in blazing colour!
  155.  
  156.    Thanks to all the people who replied to my earlier post.  And thanks
  157. in advance to all those who reply to this one.
  158.  
  159.   So, if you want to subscribe to the GameMaster mailing list, drop me a
  160. line at gurhs@uniwa.uwa.oz.au.  If you have any more suggestions, or you
  161. wish to write a rulebook, drop me a line.  
  162.  
  163.   Rhys.
  164. - -----------------------------------------------------------------------------
  165. Rhys Hollow (gurhs@uniwa.uwa.oz.au) "ee'er by gum he's a bad'un!" -DangerMouse.
  166.  
  167.  
  168.  
  169.  
  170. ---------------------------
  171.  
  172. From: engber@ils.nwu.edu (Mike Engber)
  173. Subject: How to tell if you've got a DialogPeek or a WindowPtr?
  174. Date: 12 Feb 92 00:49:48 GMT
  175. Organization: The Institute for the Learning Sciences
  176.  
  177.  
  178. Right now I'm using:
  179.  
  180. static Boolean IsDLOG(WindowPtr w){
  181.     return GetHandleSize(((DialogPeek)(w))->items) > 0;
  182. }
  183.  
  184. Can anyone think of a better (safer way)?
  185.  
  186. And I have a plausible use, I'm writing a CDEF that behaves differently
  187. depending on if it's in a dialog or in a window. You see, GetDItem bombs
  188. if you pass it a WindowPtr.
  189.  
  190. Please cc via email if possible.
  191.  
  192. -ME
  193.  
  194.  
  195.  
  196. - -------------------------
  197.  
  198. From: keith@Apple.COM (Keith Rollin)
  199. Subject:  How to tell if you've got a DialogPeek or a WindowPtr?
  200. Date: 14 Feb 92 03:23:13 GMT
  201. Organization: Apple Computer Inc., Cupertino, CA
  202.  
  203. In article <1992Feb12.004948.4208@ils.nwu.edu> engber@ils.nwu.edu (Mike Engber) writes:
  204. >
  205. >Right now I'm using:
  206. >
  207. >static Boolean IsDLOG(WindowPtr w){
  208. >    return GetHandleSize(((DialogPeek)(w))->items) > 0;
  209. >}
  210. >
  211. >Can anyone think of a better (safer way)?
  212. >
  213. >And I have a plausible use, I'm writing a CDEF that behaves differently
  214. >depending on if it's in a dialog or in a window. You see, GetDItem bombs
  215. >if you pass it a WindowPtr.
  216.  
  217. Two comments:
  218.  
  219. o First, if you need two different kinds of CDEFs, then write two
  220.   different CDEFs. Or, at least, attach some significance to the
  221.   variation code of the control. Use one variation for windows, and
  222.   another for dialogs. I think it's a very bad idea to have a control
  223.   that magically changes depending on what kind of window it's in.
  224.  
  225. o Second, to answer your question, take a look at the windowKind
  226.   field of the window record. This field contains dialogKind for
  227.   dialogs, and userKind or greater for document windows.
  228.  
  229. -- 
  230. - ----------------------------------------------------------------------------
  231. Keith Rollin           ---            <Taligent .signature under construction>
  232. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  233.  
  234.  
  235.  
  236. - -------------------------
  237.  
  238. From: buckeye@spf.trw.com (John Wallace)
  239. Subject:  How to tell if you've got a DialogPeek or a WindowPtr?
  240. Organization: TRW Data Systems Center, Redondo Beach, CA
  241. Date: Sat, 15 Feb 92 02:20:53 GMT
  242.  
  243. In article <1992Feb12.004948.4208@ils.nwu.edu> engber@ils.nwu.edu (Mike Engber) writes:
  244. >
  245. >Right now I'm using:
  246. >
  247. >static Boolean IsDLOG(WindowPtr w){
  248. >    return GetHandleSize(((DialogPeek)(w))->items) > 0;
  249. >}
  250. >
  251. >Can anyone think of a better (safer way)?
  252. >
  253. >And I have a plausible use, I'm writing a CDEF that behaves differently
  254. >depending on if it's in a dialog or in a window. You see, GetDItem bombs
  255. >if you pass it a WindowPtr.
  256. >
  257.  
  258. You may want to store the information about your window/dialog in its
  259. refCon.  This avoids a call to GetHandleSize when it is a window and
  260. the items field contains garbage (which may actually reference a valid
  261. handle in which case your call would mistakenly return TRUE).
  262.  
  263. If you allocate the window/dialog's memory in the heap you could also
  264. write:
  265.  
  266. function IsDialog(window : WindowPtr) : Boolean;
  267. begin
  268.     IsDialog := GetPtrSize(Ptr(window)) = SizeOf(DialogRecord);
  269. end;
  270.  
  271.  
  272. Hope this helps!
  273. John
  274.  
  275. - -
  276. John Wallace        buckeye@spf.trw.com
  277.  
  278.  
  279.  
  280.  
  281. - -------------------------
  282.  
  283. From: smoke@well.sf.ca.us (Nicholas Jackiw)
  284. Subject:  How to tell if you've got a DialogPeek or a WindowPtr?
  285. Date: 15 Feb 92 21:08:40 GMT
  286. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  287.  
  288. In article <1992Feb12.004948.4208@ils.nwu.edu> engber@ils.nwu.edu (Mike Engber) writes:
  289. >
  290. >Right now I'm using:
  291. >
  292. >static Boolean IsDLOG(WindowPtr w){
  293. >    return GetHandleSize(((DialogPeek)(w))->items) > 0;
  294. >}
  295. >
  296. >Can anyone think of a better (safer way)?
  297.  
  298. If it's a window, instead of a dialog, then DialogPeek(w)^.items is
  299. undefined.  GetHandleSize on it is likewise undefined.  It's only
  300. luck that it should be returning zero to you.
  301.  
  302. Try instead checking WindowPeek(w)^.windowKind=dialogKind.
  303.  
  304.  
  305. -- 
  306.                               --- * ---
  307. Nick Jackiw                  Smoke@well.sf.ca.us   | Jackiw@cs.swarthmore.edu
  308. Key Curriculum Press, Inc.   Applelink:KEY.EDUSOFT | (415) 548-2304
  309.                               --- * ---
  310.  
  311.  
  312.  
  313. ---------------------------
  314.  
  315. From: mxmora@unix.SRI.COM (Matt Mora)
  316. Subject: How do you find something in memory fast?
  317. Date: 13 Feb 92 00:59:41 GMT
  318. Organization: SRI International, Menlo Park, CA
  319.  
  320. After seeing all these post about how to fill a block/copy
  321. a block of memory really fast, I was wondering if anybody
  322. has done the same thing for finding a string in a block of memory.
  323. Right now I'm using munger but I would like to port my program to other
  324. platforms and it won't have a munger function.
  325.  
  326. Thanks
  327.  
  328. Matt
  329.  
  330.  
  331.  
  332.  
  333. -- 
  334. ___________________________________________________________
  335. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  336. SRI International           |  my unix  mxmora@unix.sri.com
  337. ___________________________________________________________
  338.  
  339.  
  340.  
  341. - -------------------------
  342.  
  343. From: smoke@well.sf.ca.us (Nicholas Jackiw)
  344. Subject:  How do you find something in memory fast?
  345. Date: 15 Feb 92 21:17:45 GMT
  346. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  347.  
  348. In article <32449@unix.SRI.COM> mxmora@sri-unix.sri.com (Matt Mora) writes:
  349. >After seeing all these post about how to fill a block/copy
  350. >a block of memory really fast, I was wondering if anybody
  351. >has done the same thing for finding a string in a block of memory.
  352. >Right now I'm using munger but I would like to port my program to other
  353. >platforms and it won't have a munger function.
  354. >
  355. >Thanks
  356. >
  357. >Matt
  358.  
  359. Well; first let it be said that one can do much better than brute force.
  360. If you consider a search for pattern of length A in a search field
  361. length B;  brute force has a worst case proportional to A*B (though in
  362. many applications, like English text, you're much more likely to run at
  363. or near A+B).  S. A. Cook came up with a proof that a you can always do
  364. it proportional to A+B; Knuth-Morris-Pratt is the name given to the
  365. standard implementation of this machine.   There's also the Boyer-Moore,
  366. which is usually even better, because it examines only a fraction of
  367. the characters.
  368.  
  369. Unfortunately, I can't explain how any of these works.  It takes a good
  370. CS primer a dozen pages to work through them; and while I've occasionally
  371. followed such chapters through with understanding, a week or two later
  372. my ability to summarize them grows dim.  Fortunately, I can put you on
  373. to good references.   Check out _Algorithms_ by Sedgewick (ISBN 0-201-
  374. 06673-4; Addison-Wesley) for an overview of the field, or any of Knuth's
  375. articles or texts on the subject.
  376.  
  377. -- 
  378.                               --- * ---
  379. Nick Jackiw                  Smoke@well.sf.ca.us   | Jackiw@cs.swarthmore.edu
  380. Key Curriculum Press, Inc.   Applelink:KEY.EDUSOFT | (415) 548-2304
  381.                               --- * ---
  382.  
  383.  
  384.  
  385. ---------------------------
  386.  
  387. From: gluttony@reed.edu!gluttony.reed.edu!pcalahan (Patrick John Calahan)
  388. Subject: Using Fonts in Application
  389. Date: 13 Feb 92 07:28:01 GMT
  390. Organization: Reed College, Portland, OR
  391.  
  392. I've written a Mac application which needs to use several fonts which may
  393. not be in the user's system file.  What is the best way to make fonts
  394. stored in the application's resource fork available for use by the  
  395. application?
  396.  
  397.  
  398.  
  399. - -------------------------
  400.  
  401. From: oster@well.sf.ca.us (David Phillip Oster)
  402. Subject:  Using Fonts in Application
  403. Date: 17 Feb 92 06:06:53 GMT
  404. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  405.  
  406. In article <m0lEarO-0006ChC@gluttony.reed.edu> gluttony@reed.edu!gluttony.reed.edu!pcalahan (Patrick John Calahan) writes:
  407. >I've written a Mac application which needs to use several fonts which may
  408. >not be in the user's system file.  What is the best way to make fonts
  409. >stored in the application's resource fork available for use by the  
  410. >application?
  411.  
  412. Inside Mac Vol 6, Script Manage chapter, has a section on a reserved range of 
  413. font ids for fonts that are captive to an applicationn. You'll probably
  414. want to name the fonts with a leading ".", or "%", this bit of magic keeps
  415. them from showing up in the font menus. If you _do_ want them to show,
  416. then you might do what Hypercard does, and put up an annoying dialog telling the
  417. user to install the missing fonts.
  418. -- 
  419. -- David Phillip Oster - At least the government doesn't make death worse.
  420. -- oster@well.sf.ca.us = {backbone}!well!oster
  421.  
  422.  
  423.  
  424. ---------------------------
  425.  
  426. From: kanderso@mabillon.ICS.UCI.EDU (Kenneth Anderson)
  427. Subject: A question on clipping
  428. Date: 13 Feb 92 18:59:45 GMT
  429.  
  430. I have a question about setting the clipping region to acheive a particular
  431. effect.  I am programming my first After Dark module, so I'm doing something
  432. simple with rectangles to get my feet wet.  I blank the screen, and then
  433. create a whole bunch of rectangles (determined by value set by the user)
  434. and then randomly I would like to select one of the rectangles and change
  435. its pattern. I also treat the blankrgn (the entire screen) as a rectangle,
  436. so every now and then I change the pattern of if with the following
  437. call...
  438.  
  439.   FillRgn(blankRgn,ThePattern);
  440.  
  441. Where ThePattern is one of the system-defined patterns.
  442.  
  443. My problem: When I do this, I erase all of the rectangles that were
  444. previously there.  They, of course, begin to appear again, when I
  445. change their pattern, but only for a brief time, before the above
  446. call erases (actually fills is the better word) them again.
  447.  
  448. My question:  How can I set the clipping region, so that the blankrgn's
  449. pattern changes, but the rectangles that are already on the screen remain.
  450.  
  451. What I have done:  I have tried several solutions.  I keep my rectangles
  452. in an array.  I loop through this array, doing something like the
  453. following...
  454.  
  455. RgnHandle aRgn = NewRgn();
  456. RgnHandle clipRegion = NewRgn();
  457.  
  458. for (i=0; i<CurrentIndex+1; i++)
  459. {
  460.    OpenRgn();
  461.    FillRect(myarray[i].aRect,ThePattern);
  462.    CloseRgn(aRgn);
  463.    UnionRgn(clipRegion,aRgn,clipRegion);
  464. }
  465.  
  466. So hopefully the above code will create a region which is the
  467. union of all the rectangles displayed on the screen.  Now I
  468. want to fill the screen with a new pattern, but I don't want to
  469. fill any portion of the screen that is in clipRegion.
  470.  
  471. So what should I do now?
  472.  
  473.  
  474. Any help or info would be greatly appreciated, either post or send
  475. mail, I read both....
  476.  
  477. Thanks in advance,
  478.  
  479. Ken Anderson
  480.  
  481.  
  482.  
  483. - -------------------------
  484.  
  485. From: synge@seasid.enet.dec.com (James M Synge)
  486. Subject:  A question on clipping
  487. Organization: Digital Equipment Corporation
  488. Date: 17 FEB 92 11:01:24    
  489.  
  490. In article <9202131059.aa05051@Paris.ics.uci.edu>, kanderso@mabillon.ICS.UCI.EDU (Kenneth Anderson) writes...
  491. >My question:  How can I set the clipping region, so that the blankrgn's
  492. >pattern changes, but the rectangles that are already on the screen remain.
  493. >What I have done:  I have tried several solutions.  I keep my rectangles
  494. >in an array.  I loop through this array, doing something like the
  495. >following...
  496. >RgnHandle aRgn = NewRgn();
  497. >RgnHandle clipRegion = NewRgn();
  498. >for (i=0; i<CurrentIndex+1; i++)
  499. >{
  500. >   OpenRgn();
  501. >   FillRect(myarray[i].aRect,ThePattern);
  502. >   CloseRgn(aRgn);
  503. >   UnionRgn(clipRegion,aRgn,clipRegion);
  504. >}
  505.  
  506. I think you may have reversed the regions.  clipRegion is the area in which
  507. you don't want to draw.  So you need to subtract this region from the
  508. blankrgn, and to draw into the resulting region.
  509.  
  510. James
  511.  
  512.  
  513.  
  514. ---------------------------
  515.  
  516. From: whaley@spectre.pa.dec.com (Ken Whaley)
  517. Subject: Q: where to find 680x0 instruction timings?
  518. Date: 13 Feb 92 20:11:40 GMT
  519. Organization: Digital Equipment Corporation
  520.  
  521. I've looked both in the Motorola User's and Programmer's manuals (albeit not
  522. extremely carefully), and in a third party 68030 book I just bought.  I can't
  523. find cycle counts for individual instructions.  Have I just overlooked 
  524. something?  Is this information published?
  525.  
  526. Thanks,
  527.     Ken
  528. --
  529. Ken Whaley                                        whaley@atd.dec.com
  530.                                                          or
  531.                           whaley@decpa.pa.dec.com
  532.  
  533.  
  534.  
  535. - -------------------------
  536.  
  537. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  538. Subject:  Q: where to find 680x0 instruction timings?
  539. Organization: University of Illinois at Urbana
  540. Date: Thu, 13 Feb 1992 23:20:00 GMT
  541.  
  542. whaley@spectre.pa.dec.com (Ken Whaley) writes:
  543.  
  544. >I've looked both in the Motorola User's and Programmer's manuals (albeit not
  545. >extremely carefully), and in a third party 68030 book I just bought.  I can't
  546. >find cycle counts for individual instructions.  Have I just overlooked 
  547. >something?  Is this information published?
  548.  
  549. You can find instruction timings in the Motorola MC68000 book, which
  550. includes timings for the 68000, 68008, 68010, and 68H000. As far as I
  551. know, they stopped publishing them for the 68020, 68030 and 68040
  552. because there were so many variables they couldn't get reasonable
  553. times, or something like that.
  554.  
  555. pr
  556. --
  557. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  558. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  559. System manager - Cognitive Science Group, Beckman Institute, UIUC
  560. Internet: resnick@cogsci.uiuc.edu
  561.  
  562.  
  563.  
  564. - -------------------------
  565.  
  566. From: pope@daimi.aau.dk (Povl Hessellund Pedersen)
  567. Subject:  Q: where to find 680x0 instruction timings?
  568. Date: 14 Feb 92 12:02:21 GMT
  569. Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
  570.  
  571. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  572.  
  573. >whaley@spectre.pa.dec.com (Ken Whaley) writes:
  574.  
  575. >>I've looked both in the Motorola User's and Programmer's manuals (albeit not
  576. >>extremely carefully), and in a third party 68030 book I just bought.  I can't
  577. >>find cycle counts for individual instructions.  Have I just overlooked 
  578. >>something?  Is this information published?
  579.  
  580. >You can find instruction timings in the Motorola MC68000 book, which
  581. >includes timings for the 68000, 68008, 68010, and 68H000. As far as I
  582. >know, they stopped publishing them for the 68020, 68030 and 68040
  583. >because there were so many variables they couldn't get reasonable
  584. >times, or something like that.
  585.  
  586. In my copy of the Motorola 68030 manual there is instruction timins
  587. for all the instructions. You have to calculate them yourself, using
  588. the basic instruction timing, add time for addressing modes, and then
  589. asee if there is some head/tail overlap that should be removed when
  590. the stuff is in the cache.
  591.  
  592. My manual is the 2nd/3rd or 4th edition. I am not sure which one.
  593. --
  594. Povl H. Pedersen (External student at dept. of CS, student at dept. economics)
  595. eco861771@ecostat.aau.dk   /   pope@daimi.aau.dk ( soon to be closed )
  596. - -
  597. Testing for .signature virus .....    No virus found. Posting proceeds...
  598.  
  599.  
  600.  
  601. - -------------------------
  602.  
  603. From: farren@cbmvax.commodore.com (Mike Farren)
  604. Subject:  Q: where to find 680x0 instruction timings?
  605. Date: 14 Feb 92 19:40:11 GMT
  606. Organization: Nowhere Man, Inq.
  607.  
  608. resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  609. >whaley@spectre.pa.dec.com (Ken Whaley) writes:
  610. >
  611. >>I've looked both in the Motorola User's and Programmer's manuals (albeit not
  612. >>extremely carefully), and in a third party 68030 book I just bought.  I can't
  613. >>find cycle counts for individual instructions.  Have I just overlooked 
  614. >>something?  Is this information published?
  615. >
  616. >You can find instruction timings in the Motorola MC68000 book, which
  617. >includes timings for the 68000, 68008, 68010, and 68H000. As far as I
  618. >know, they stopped publishing them for the 68020, 68030 and 68040
  619. >because there were so many variables they couldn't get reasonable
  620. >times, or something like that.
  621.  
  622. I've got a copy of the "MC68030 Enhanced 32-bit Microprocessor User's
  623. Manual", Motorola part number MC68030UM/AD, and it devotes a rather
  624. large amount of space to instruction timings.  Rather useless information,
  625. though, since instruction timing on an MC68030 is extremely dependent
  626. on the *exact* circumstances of instruction execution - what's in the
  627. cache, what's not in the cache, external memory speed, etc.
  628.  
  629. - --------------------------------------------------------------------------
  630. Mike Farren - no longer employed by Commodore.  Still only my opinions,
  631. and not those of any organization.
  632.  
  633.  
  634.  
  635. - -------------------------
  636.  
  637. From: tom@dtint.uucp (Thomas R. Kimpton)
  638. Subject:  Q: where to find 680x0 instruction timings?
  639. Date: 14 Feb 92 18:39:19 GMT
  640. Organization: Digital Technology, International
  641.  
  642. In article <1992Feb13.232000.28452@ux1.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  643. >whaley@spectre.pa.dec.com (Ken Whaley) writes:
  644. >
  645. >>I've looked both in the Motorola User's and Programmer's manuals (albeit not
  646. >>extremely carefully), and in a third party 68030 book I just bought.  I can't
  647. >>find cycle counts for individual instructions.  Have I just overlooked 
  648. >>something?  Is this information published?
  649. >
  650. >You can find instruction timings in the Motorola MC68000 book, which
  651. >includes timings for the 68000, 68008, 68010, and 68H000. As far as I
  652. >know, they stopped publishing them for the 68020, 68030 and 68040
  653. >because there were so many variables they couldn't get reasonable
  654. >times, or something like that.
  655. [deleted]
  656. >Pete Resnick             (...so what is a mojo, and why would one be rising?)
  657.  
  658. Look in section 9 "Instruction Execution Timing" in 
  659. "MC68020 32-Bit Microprocessor User's Manual" Second
  660. Edition.  I don't have my '030 manual here, but I
  661. think it has the same section,  the '881/'882 book
  662. has the same section (section 8, though), I don't have
  663. the '851 book here either, but I think it has the
  664. same section also.
  665.  
  666. Note that the instruction times are split into
  667. the basic instruction timing, and into the
  668. operand fetch/store timing.  It also shows timing
  669. for instructions in cache with instruction pipeline
  670. overlap, cache no overlap, no cache no overlap.
  671.  
  672.  
  673. -- 
  674. - -
  675. Tom Kimpton                            tom@dtint.dtint.com
  676. Digital Technology Int.                (801)226-2984    
  677. 500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
  678.  
  679.  
  680.  
  681. - -------------------------
  682.  
  683. From: southa@aix02.ecs.rpi.edu (Andrew R. Southwick)
  684. Subject:  where to find 680x0 instruction timings?
  685. Organization: Rensselaer Polytechnic Institute, Troy NY
  686. Date: Mon, 17 Feb 1992 04:38:20 GMT
  687.  
  688. In article farren@cbmvax.commodore.com (Mike Farren) writes:
  689. >>whaley@spectre.pa.dec.com (Ken Whaley) writes:
  690. >>>I've looked both in the Motorola User's and Programmer's manuals (albeit not
  691. >>>extremely carefully), and in a third party 68030 book I just bought.  I can't
  692. >>>find cycle counts for individual instructions.  Have I just overlooked 
  693. >>>something?  Is this information published?
  694. >
  695. >I've got a copy of the "MC68030 Enhanced 32-bit Microprocessor User's
  696. >Manual", Motorola part number MC68030UM/AD, and it devotes a rather
  697. >large amount of space to instruction timings.  Rather useless information,
  698. >though, since instruction timing on an MC68030 is extremely dependent
  699. >on the *exact* circumstances of instruction execution - what's in the
  700. >cache, what's not in the cache, external memory speed, etc.
  701.  
  702. I have the M68000 users manual and a programmers manual for the 68000 series
  703. as well.  The programmers manual covers the instructions and their uses.
  704. Good for learning the lingo.  It is the same information in the users manual
  705. but it covers all of the processors, the floating point instructions,
  706. etc.  M68000, 020, 030, 040, 851, 881, and 882 are covered in the prog.'s
  707. manual.  The users manual has, other than introductory material, timing in
  708. the form of the number of cycles used for each instruction.  It would be
  709. helpful to take a look at a 68030/040 or whatever users manual for
  710. yourself to decide if it has what you are looking for.
  711.  
  712. -ars
  713. southa@rpi.edu  Andrew R. Southwick
  714.  
  715.  
  716.  
  717.  
  718. - -------------------------
  719.  
  720. From: paulr@syma.sussex.ac.uk (Paul Russell)
  721. Subject:  Q: where to find 680x0 instruction timings?
  722. Date: 17 Feb 92 10:45:00 GMT
  723. Organization: University of Sussex
  724.  
  725. >From article <1992Feb13.232000.28452@ux1.cso.uiuc.edu>, by resnick@cogsci.uiuc.edu (Pete Resnick):
  726. > whaley@spectre.pa.dec.com (Ken Whaley) writes:
  727. >>I've looked both in the Motorola User's and Programmer's manuals (albeit not
  728. >>extremely carefully), and in a third party 68030 book I just bought.  I can't
  729. >>find cycle counts for individual instructions.  Have I just overlooked 
  730. >>something?  Is this information published?
  731. > You can find instruction timings in the Motorola MC68000 book, which
  732. > includes timings for the 68000, 68008, 68010, and 68H000. As far as I
  733. > know, they stopped publishing them for the 68020, 68030 and 68040
  734. > because there were so many variables they couldn't get reasonable
  735. > times, or something like that.
  736.  
  737. Programmer's Assistants from Aladdin includes a DA called Bean Counter,
  738. which totals up cycle counts for you when you type in 680x0 source
  739. (I think you can paste source into it too).
  740.  
  741. Unfortunately Aladdin seem to have become very unreliable with their
  742. support (eg: ShortCut hasn't been updated for System 7.0 yet) so
  743. I'm loath to give any of their products my full recommendation
  744. at present.
  745.  
  746. //Paul
  747.  
  748. -- 
  749. |  Paul Russell                  |  "Microsoft MS-DOS 5.0 gives your  |
  750. |  Dept Experimental Psychology  |   computer something you'll both   |
  751. |  University of Sussex, Falmer  |   love - an extra 45k memory."     |
  752. |  Brighton BN1 9QG, England     |        -- Microsoft advertisement  |
  753.  
  754.  
  755.  
  756. ---------------------------
  757.  
  758. From: cantwell@vuse.vanderbilt.edu (Jeff Cantwell)
  759. Subject: Prograph experiences?
  760. Date: 14 Feb 92 20:42:51 GMT
  761. Organization: Vanderbilt University School of Engineering, Nashville, TN, USA
  762.  
  763.  
  764. We are thinking of using Prograph as a development platform for a
  765. variety of tools.  Right now we are basically a Smalltalk-80 group.
  766. How difficult is it to learn Prograph?  How long does it take to come
  767. up to speed? How hard is it to do graphical visualization tools in
  768. Prograph? Has anyone done anything like this?  We are thinking of
  769. starting simply and doing some basic charting tools (bar charts,
  770. plots, flowcharts, etc).  Is this possible in Prograph?  Any advice
  771. would be appreciated!
  772.  
  773. -- 
  774. Jeff Cantwell, Vanderbilt U. CIS Box 1804, Sta. B Nashville, TN 37235 
  775.   Internet: cantwell@vuse.vanderbilt.edu Bitnet: CANTWEJR@VUCTRVAX
  776.     Phone: (615) 322-0110  Fax: (615) 343-6449
  777.        2 Cor. 12:9 "Power is perfected in weakness."
  778.  
  779.  
  780.  
  781. - -------------------------
  782.  
  783. From: synge@seasid.enet.dec.com (James M Synge)
  784. Subject:  Prograph experiences?
  785. Organization: Digital Equipment Corporation
  786. Date: 17 FEB 92 11:11:15    
  787.  
  788. In article <1992Feb14.204251.217@vuse.vanderbilt.edu>, cantwell@vuse.vanderbilt.edu (Jeff Cantwell) writes...
  789. >We are thinking of using Prograph as a development platform for a
  790. >variety of tools.  Right now we are basically a Smalltalk-80 group.
  791. >How difficult is it to learn Prograph?  How long does it take to come
  792. >up to speed? How hard is it to do graphical visualization tools in
  793. >Prograph? Has anyone done anything like this?  We are thinking of
  794. >starting simply and doing some basic charting tools (bar charts,
  795. >plots, flowcharts, etc).  Is this possible in Prograph?  Any advice
  796. >would be appreciated!
  797.  
  798. Suggestion: subscribe to the info-prograph mailing list by sending a
  799. request to info-prograph-request@grove.iup.edu.  Once you're on the list
  800. (you'll receive a reply), ask your question of the readers of the list.
  801.  
  802. I just bought a copy of Prograph 2.5, and am going through the tutorials
  803. (necessary because it is so different from the previous languages I've
  804. used).
  805.  
  806. I've quite excited by the language and programming environment. The fact
  807. that I can add/change code as I'm running the program, and have the
  808. interpreter automatically rollback to just before the changed code makes 
  809. developing code a pleasure.  And the excellent support for the basics of
  810. the Macintosh interface (windows, scroll lists, buttons, etc.) makes it
  811. possible to built elementary applications quickly.  I don't yet know how it
  812. is going to compare to Think C and TCL when it comes to more customized
  813. graphics applications.
  814.  
  815. The major drawback is that it is non-standard.  I understand that TGS is
  816. working to port Prograph to Unix platforms, and that should improve the
  817. situation.
  818.  
  819. James Synge
  820.  
  821.  
  822.  
  823. ---------------------------
  824.  
  825. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  826. Subject: TeachText doesn't reply to 'odoc' events.  Why?
  827. Organization: CIS Dept., Syracuse University
  828. Date: Fri, 14 Feb 92 13:27:47 EST
  829.  
  830. I have found that whenever I send an 'odoc' event to TeachText, I do
  831. not get a reply (at least, not within the default timeout preiod of
  832. about a minute).
  833.  
  834. The document gets opened by TeachText without any trouble, but no reply.
  835.  
  836. Any explanations?
  837.  
  838. Thanks.
  839.  
  840. --
  841. J. S. Greenfield                                         greeny@top.cis.syr.edu
  842. (I like to put 'greeny' here, 
  843. but my d*mn system wants a 
  844. *real* name!)                        "What's the difference between an orange?"
  845.  
  846.  
  847.  
  848. - -------------------------
  849.  
  850. From: lai@Apple.COM (Ed Lai)
  851. Subject:  TeachText doesn't reply to 'odoc' events.  Why?
  852. Date: 17 Feb 92 15:52:17 GMT
  853. Organization: Apple Computer Inc., Cupertino, CA
  854.  
  855. In article <1992Feb14.132747.16109@newstand.syr.edu> greeny@top.cis.syr.edu (Jonathan Greenfield) writes:
  856. >I have found that whenever I send an 'odoc' event to TeachText, I do
  857. >not get a reply (at least, not within the default timeout preiod of
  858. >about a minute).
  859. >
  860. >The document gets opened by TeachText without any trouble, but no reply.
  861. >
  862. >Any explanations?
  863. >
  864.  
  865. The version of TeachText in the system 7.0 does not use the Apple Event
  866. Manger, so don't expect it to honor the reply flag.
  867.  
  868. /* Disclaimer: All statments and opinions expressed are my own */
  869. /* Edmund K. Lai                                               */
  870. /* Apple Computer, MS37-UP                                     */
  871. /* 20525 Mariani Ave,                                          */
  872. /* Cupertino, CA 95014                                         */
  873. /* (408)974-6272                                               */
  874. zW@h9cOi
  875.  
  876.  
  877.  
  878. ---------------------------
  879.  
  880. From: afrancke@hmcvax.claremont.edu
  881. Subject: (Q): How do I execute UpdateEvents?
  882. Date: 17 Feb 92 10:21:06 GMT
  883. Organization: Harvey Mudd College
  884.  
  885. Here's a fairly straightforward query:
  886.  
  887.     How do I implement window updates after I get an UpdateEvent?
  888.  
  889. This is a little less stupid than it may seem. I am a C programmer, brought up
  890. to speed on the Mac by Dave Mark's series. Mark only includes sample code for
  891. an update that occurs *in a window with a PICT associated with it*, nothing
  892. about refreshing text-filled windows, etc. Before I go rooting through the TCL
  893. source code to find the way they do it for a "generic" window, what do YOU
  894. suggest? "Programming for System 7" advises attaching a handle to any given
  895. window's RefCon in order to store data, but I'm not sure what type of data I
  896. need to store to refresh a window. I'm sure there's a simple solution, but I'm
  897. at a loss to the answer. Source code would be *much* appreciated.
  898.  
  899. Andy Francke
  900.  
  901.  
  902.  
  903. - -------------------------
  904.  
  905. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  906. Subject:  (Q): How do I execute UpdateEvents?
  907. Date: 17 Feb 92 16:59:28 GMT
  908. Organization: Royal Institute of Technology, Stockholm, Sweden
  909.  
  910. .claremont.edu> afrancke@hmcvax.claremont.edu writes:
  911.  
  912.    Here's a fairly straightforward query:
  913.  
  914.        How do I implement window updates after I get an UpdateEvent?
  915.  
  916.  
  917. This is one of the classic humps to overcome. There are two ways of
  918. doing it. If your data is expensive to compute; you could just associate
  919. a bitmap with the window, draw into the bitmap and post an update event
  920. to get the data displayed - update events should just copy from the
  921. bitmap (probably stored in the wRefCon) into the window.
  922.  
  923. The "better" (less memory-intensive way) is to create a few structs for
  924. your various window kinds:
  925.  
  926. typedef struct fooWindow {
  927.  
  928.     short        windowType ;
  929.     Handle        fooData ;
  930.     Rect        fooRect ;
  931.  
  932. } FooWindow ;
  933.  
  934. typedef struct barWindow {
  935.  
  936.     short        windowType ;
  937.     short        data [ 10 ] ;
  938.  
  939. } BarWindow ;
  940.  
  941. You then create a window by creating a struct, filling it in with
  942. initial data, creating the window and stuffing a handle containing
  943. this struct into the wRefCon. Updates and clicks and whatever are
  944. simplest handled by checking the short first in the handle, and
  945. then switch (or table-of-function-lookup) on that value.
  946.  
  947. Or you could use the TCL and have no need to handle widnow updates
  948. at all; your panes will get Draw messages whenever necessary.
  949.  
  950. --
  951. This Signature is distributed under the conditions of the Signature License,
  952. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  953. implies that you accept to be bound by the terms in said License. Should you
  954. not agree on any of these terms, you must return the Signature unread to me.
  955.  
  956.  
  957.  
  958. ---------------------------
  959.  
  960. From: steve@hacker.uucp (Stephen M. Youndt)
  961. Subject: Dialog Boxes & float variables in THINK C
  962. Date: 17 Feb 92 13:50:11 GMT
  963. Organization: HaL Systems, Burke, VA
  964.  
  965. I'm trying to write a small routine in THINK C that displays a modal dialog
  966. box and read in 3 values.  I've found the routines that allow me to convert
  967. extended to string and vice-versa, but what I'd really like to do is convert
  968. extended to float, so that I can do some real arithmetic without incurring
  969. all the overhead and ugliness of repeated SANE calls. 
  970.  
  971. On a side note, what documentation is recommended to someone doing lots of
  972. FP work. I have IM I-VI, but have been unable to find a way to make this work.
  973. Is the Guide to Numerics also considered a must have?
  974.  
  975. Answers w/ references or better yet, examples, will be greatly appreciated.
  976. Thanks in advance. -- SMY
  977. - -
  978. Stephen M. Youndt       10201 Chase Commons Drive #106    Phone: 703-978-6352 H
  979. uunet!hacker!steve      Burke, VA 22015                          301-294-0162 W
  980.  
  981.  
  982.  
  983. - -------------------------
  984.  
  985. From: dougm@descartes.cns.caltech.edu (Doug McNaught)
  986. Subject:  Dialog Boxes & float variables in THINK C
  987. Date: 17 Feb 92 17:41:08 GMT
  988. Organization: California Institute of Technology
  989.  
  990. Steve, mail to you bounced, so...
  991.  
  992. In article <607@hacker.UUCP> steve@hacker.uucp (Stephen M. Youndt) writes:
  993. >I'm trying to write a small routine in THINK C that displays a modal dialog
  994. >box and read in 3 values.  I've found the routines that allow me to convert
  995. >extended to string and vice-versa, but what I'd really like to do is convert
  996. >extended to float, so that I can do some real arithmetic without incurring
  997. >all the overhead and ugliness of repeated SANE calls. 
  998.  
  999.   Bad news--as far as I know, SANE is used for all floating point, whether
  1000. it's float, double, or extended. It's all done in 80-bit extended precision,
  1001. too, so float is just a way to store limited precision values in less space,
  1002. and you may actually incur more overhead from converting float->ext->float
  1003. each time. The compiler, of course, generates the SANE calls for you, so you
  1004. don't actually have to do the traps yourself, unless you're doing something
  1005. SANE-specific, like setting the rounding mode. The speedy alternative is to
  1006. set the compiler to generate 6888[12] calls, but then you lose generality.
  1007. (And lose completely, if you have a Classic like me :-( )
  1008.   If you really want to learn about this stuff, the _Apple Numerics Manual_ is
  1009. indeed what you want--it has a quote something like "Is it really better to
  1010. get the wrong answer fast?" 
  1011.   NOTE: The above is gleaned from reading IM in detail, the Numerics Manual
  1012. once, and using THINK Pascal extensively. I haven't used C much but don't
  1013. think it does things very differently.
  1014. luck,
  1015. doug
  1016.  
  1017. -- 
  1018. <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
  1019. <> Doug McNaught                          dougm@descartes.caltech.edu <>
  1020. <>  Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
  1021. <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
  1022.  
  1023.  
  1024.  
  1025. ---------------------------
  1026.  
  1027. End of C.S.M.P. Digest
  1028. **********************
  1029.